﻿using System;
using Microsoft.Xna.Framework;
using Survival.Services;
using Survival.World;

namespace Survival.Animals
{
    public abstract partial class Animal : IPhysical
    {
        //todo: maybe generalize this so it can be used for plants, animals, buildings, and humans

        private DateTime BirthTime;

        private AnimalServices animalServices;

        public AnimalServices AnimalServices { get { return animalServices; } }

        public Animal(AnimalServices animalServices)
        {
            BirthTime = DateTime.Now;
            this.animalServices = animalServices;;
        }

        public abstract String SpriteName { get; }

        public abstract Vector2 Position { get; }

        public abstract float Rotation { get; }

        public abstract void Update(GameTime gameTime);

        public TimeSpan Alivetime { get { return DateTime.Now - BirthTime; } }

    }
}
